/*
 *  Beam.h
 *  
 *	Version 1.0
 *  Created by Nicholas Blecha on 9/20/10.
 *  Copyright 2010 Michigan Technological University. All rights reserved.
 *
 */



#ifndef BEAM_H
#define BEAM_H

#include <math.h>

#ifndef M_PI
#define M_PI 3.14159265
#endif

#define BEAM_LIMIT 8
#define GREEN 0
#define RED 1
#define BLUE 2
#define MISSLE 3
#define NUM_OF_COLORS 4

#include "sprite.h"

class Beam : public Sprite {
	
public:
	int getDamage();
	int getSpeed();
	void autoMove(double);
	
	bool isActive(){ return active;};
	void setActive(bool a);
	
	void setRenderer(Renderer *rend) {
		rnd = rend;
	}

	int getID(){ return id; };
	
	void show();
	void show(int mapX, int mapY);
	
	Beam(Renderer *rend, int i);
	~Beam();
	
	void initialize(int damage, int speed, float angle, int x, int y);
	void setImage(int color);
	
private:
	int	id;
	int damage;
	int speed;
	bool active;
	SDL_Surface * lasers[NUM_OF_COLORS];
	int ids[NUM_OF_COLORS];

	SDL_Rect* drawPos;
};

#endif
